#define _CRT_SECURE_NO_WARNINGS
class Solution {
public:
    int FirstNotRepeatingChar(string str) {
        for (int i = 0; str[i] != '\0'; i++)
        {
            int flag = 0;
            for (int j = 0; str[j] != '\0'; j++)
            {
                if (i != j)
                {
                    if (str[i] == str[j])
                    {
                        flag++;
                        break;
                    }
                }
            }
            if (flag == 0)
            {
                return  i;
            }
        }
        return  -1;;
    }
};